/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package servlet;

/**
 *
 * @author nguyenquang
 */
public class User {
    private String username;
    private String password;
    
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    
    public User(){
    
    }
    
    public  boolean login(){
        if(username.equalsIgnoreCase("Aptech") && password.equalsIgnoreCase("Computer")){
            return true;
        }
        return false;
    }

    public String nullString(String str)
	{	
	 	if(str==null)
	 		str="";
	 	else if(str.equals("null"))
	 		str="";
	 	else if((str.trim()).equals(""))
	 		str="";
	 	else if(str.equals(null))
	 		str="";
	 	else
	 		str=str.trim();
	 	return str;
	 }

}
